﻿@inject TemplatesModule TemplatesModule

<div style="height: 100px">
    @foreach (var t in TemplatesModule.TemplatesLanguage)
    {
        <MButton class="button" OnClick="() => OnClick?.Invoke(t)">
            <MIcon>
                @t.Icon
            </MIcon>
            @t.Title
        </MButton>
    }
</div>

@code{
    public delegate void OnClickDelegate(TemplatesLanguageModule module);

    [Parameter]
    public OnClickDelegate? OnClick { get; set; }

}

<style>
    .button {
        margin: 5px;
    }
</style>